package com.acwing.partition44;

import java.io.*;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Queue;

/**
 * @author `RKC`
 * @date 2022/3/20 19:13
 */
public class AC4377农田灌溉 {

    private static final int[] dirs = {-1, 1};
    private static final int N = 210;
    private static int[] w = new int[N];
    private static Queue<Integer> q = new ArrayDeque<>(N);
    private static int n, k;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        int t = Integer.parseInt(reader.readLine());
        while (t-- > 0) {
            String[] ss = reader.readLine().split(" ");
            n = Integer.parseInt(ss[0]);
            k = Integer.parseInt(ss[1]);
            ss = reader.readLine().split(" ");
            Arrays.fill(w, 0);
            for (int i = 0; i < k; i++) w[Integer.parseInt(ss[i])] = 1;
            writer.write(bfs() + "\n");
        }
        writer.flush();
    }

    private static int bfs() {
        for (int i = 1; i <= n; i++) {
            if (w[i] == 1) q.add(i);
        }
        while (!q.isEmpty()) {
            int u = q.poll();
            for (int dir : dirs) {
                int v = u + dir;
                if (v <= 0 || v > n || w[v] != 0) continue;
                w[v] = w[u] + 1;
                q.add(v);
            }
        }
        int ans = 0;
        for (int i = 1; i <= n; i++) ans = Math.max(ans, w[i]);
        return ans;
    }
}
